package com.jsgt.greekfire.base

import android.app.Dialog
import android.os.Bundle
import android.view.Gravity
import android.view.ViewGroup
import android.view.Window
import com.fhx.core.base.BaseDialogFragment
import com.jsgt.greekfire.R

abstract class BaseBottomDialogFragment : BaseDialogFragment() {

    override fun getDialogStyle(): Int {
        return R.style.DialogTheme
    }

    override fun setWindowAttributes(window: Window?) {
        //设置弹出位置
        window!!.setGravity(Gravity.BOTTOM)
        //设置弹出动画
        window.setWindowAnimations(R.style.alpha_anim_bottom)
        //设置对话框大小
        window.setLayout(
            ViewGroup.LayoutParams.MATCH_PARENT,
            ViewGroup.LayoutParams.WRAP_CONTENT
        )
    }
}